import request from "@/request/api";

//维保计划接口
//1.维保计划查询接口
export function queryMaintainPlanList(data) {
  return request({
    url: "/eam-service-plan/maintain/queryList",
    method: "get",
    params: data,
  });
}
//1.维保计划详情
export function queryMaintainPlanDetail(data) {
  return request({
    url: "/eam-service-plan/maintain/selectOne",
    method: "get",
    params: data,
  });
}
//2、维保计划新增或修改接口
export function addOrUpdateMaintainPlan(data) {
  return request({
    url: "/eam-service-plan/maintain/saveOrUpdate",
    method: "post",
    data: data,
  });
}
//2、、维保计划删除接口
export function deleteMaintainPlan(data) {
  return request({
    url: "/eam-service-plan/maintain/deleteById",
    method: "delete",
    params: data,
  });
}
//2、、获取任务要执行时间
export function getTriggerTime(data) {
  return request({
    url: "/eam-service-plan/maintain/triggerTime",
    method: "get",
    params: data,
  });
}
//启用停用计划
export function startOrStopPlan(data) {
  return request({
    url: "/eam-service-plan/maintain/startOrStop",
    method: "get",
    params: data,
  });
}

//下发维保计划，生成工单
export function issuePlan(data) {
  return request({
    url: "/eam-service-plan/maintain/issue",
    method: "get",
    params: data,
  });
}


export function queryExperimrntPlanList(data) {
  return request({
    url: "/eam-service-plan/issue/experiment/queryList",
    method: "get",
    params: data,
  });
}
//2、试验计划新增接口
export function addExperimentPlan(data) {
  return request({
    url: "/eam-service-plan/issue/experiment/saveOrUpdate",
    method: "post",
    data: data,
  });
}
//下发试验计划，生成工单
export function issueExperimentPlan(data) {
  return request({
    url: "/eam-service-plan/issue/experiment/issue",
    method: "get",
    params: data,
  });
}

